package com.ytjj.qmyx.users.utils;

import com.alibaba.nacos.common.utils.Md5Utils;
import com.ytjj.common.constants.TokenConstants;
import com.ytjj.common.utils.TokenUtil;

import java.util.UUID;

/**
 * @Description 随机生成token
 *
 * @Version 1.0
 * 
 */
public class GetTokenUtil {
    public static String getToken() {
        return Md5Utils.getMD5((TokenConstants.SALT+UUID.randomUUID().toString()).getBytes());
    }


    public static void main(String[] args) {
        System.out.println("token : " + getToken());
        System.out.println("TokenUtil.getToken : " + TokenUtil.getToken());
        System.out.println("TokenUtil.getUuid : " + TokenUtil.getUuid());
    }
}

